-- card: 61284 from stack: in -- bmap block id: 0 -- flags: 0000 -- background id: 4755 -- name: -- part contents for background part 6 ----- text ----- 9.2 Portability & the Macintosh -- part contents for background part 4 ----- text ----- Restriction to writing completely portable programs prevents the programmer from taking advantage of useful features specific to a single environment. For example the Macintosh ROM "Toolbox" provides many invaluable routines for writing Macintosh programs. It is often possible to confine non-portable code to individual program modules to allow reuse of the remaining code in other environments. One way of isolating non-portable code is to define an abstract class from which machine-specific versions may be derived. The files listed in the following pages implement the TC abstract Screen class for general-purpose 2-dimensional graphics combined with stdio-style output. The Mac_Screen class is derived from this class for use on the Macintosh, but C++ versions* for DOS or UNIX graphics-capable systems may readily be derived as well. This allows portable applications with simple graphics output. TC's MacTraps library is required for applications using the Mac_Screen class. TC's precompiled header MacHeaders automatically declares the Toolbox functions. -- part contents for background part 7 ----- text ----- 204 -- part contents for background part 29 ----- text ----- 55726 -- part contents for background part 27 ----- text ----- TC/C++ portability -- part contents for background part 20 ----- text ----- TC/C++ portability - p183